<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>可拖动的Div</title>
</head>
<body>
<div id="source" style="width:80px;height:80px;
    border:1px solid black;
    background-color: #bbb;"
    draggable="true">疯狂软件教育</div>
<script type="text/javascript">
    var source = document.getElementById("source");
    source.ondragstart = function(evt)
    {
        //让拖动操作携带数据
        evt.dataTransfer.setData("text/plain", "www.163.com");
    }
</script>
</body>
</html>
